package deibay.server.frontend.commands;

import deibay.messages.Message;
import deibay.messages.SubscribeItemMsg;
import deibay.server.eventargs.SubscribeItemEventArg;
import deibay.server.events.SubscribeItemEvent;
import deibay.server.frontend.FrontEndCore;
import deibay.users.User;

public class SubscribeItemCommand extends Command{

	public SubscribeItemCommand(User user, Message msg) {
		super(user, msg);
	}

	@Override
	public void execute() {
		String id = ((SubscribeItemMsg)message).getID();
		FrontEndCore.getInstance().getServerConnection().send(new SubscribeItemEvent(new SubscribeItemEventArg(user, id)));
	}
}
